<?php
	require 'header.php';
	
	$query = new EntityFieldQuery();
	$entities = $query->entityCondition('entity_type', 'node') 
	->propertyCondition('type', "_new_events")
	->propertyCondition('status', 1)  
	->execute();
	
	foreach (array_keys($entities['node']) as $record) {
	 	//print_r(node_load($record)); 
	} 
	
	//get start time and end time 
	$result = db_select("field_revision_field_event_start_date", "f")
    ->fields("f", array("field_event_start_date_value","field_event_start_date_value2"))  
	->condition('entity_id', 570) 
    ->execute();
	
	 while($record = $result->fetchAssoc()) {
	   //print_r($record);
	 }
	 
?>  

<body>
 
<div data-role="page" class="jqm-demos jqm-demos-home">
  
    <div data-role="header" class="jqm-header">
		<h1 class="jqm-logo"><img src="./img/callaway_gardens_logo.png" alt="CallawayGarden"></h1> 
        <nav>
				<ul>
					<li><a href="<?=$bookingURL?>">BOOK</li> 
					<li><a href="#">MAPS</a></li> 
					<li><a href="#">CALENDAR</a></li> 
				</ul>
		</nav> 
	</div><!-- /header -->
	
    <div data-role="content">
         
		<input name="mydate" id="mydate" type="date" data-role="datebox" 
		   data-options='{"mode": "calbox", "hideInput": true, "useHeader": false, "centerVert": true, "useAnimation": false, "highDates": ["2013-05-24", "2013-05-25"], "themeDateToday": "b" }'>
    </div>
 
</div>
 
 	 <!-- calendar -->  
	<link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.min.css" /> 
	
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> 
	<script type="text/javascript" src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
	
	<!-- Optional Mousewheel support: http://brandonaaron.net/code/mousewheel/docs -->
	<script type="text/javascript" src="PATH/TO/YOUR/COPY/OF/jquery.mousewheel.min.js"></script>
	
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.core.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.calbox.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/i18n/jquery.mobile.datebox.i18n.en_US.utf8.js"></script>
 	<script type="text/javascript">
 
	 	$(document).ready(function() {
	 		 
	 		$('#mydate').datebox('open')

	 		$('#mydate').bind('datebox', function (e, passed) { 
	 			  if ( passed.method === 'close' ) {
	 				 
	 			    $('#mydate').datebox('open');
	 			    alert( $('#mydate').datebox('getTheDate'));
	 			  }else if ( passed.method === 'doset' ) {
		 				 
		 			 
		 		  }
	 		});
	 	});
 	</script> 
 	 
</body>
</html>